/**
 * @BelongsProject : LeetCode
 * @Author : WXY
 * @CreateTime : 2022-12-04  21:16
 * @Description : 278. 第一个错误的版本
 * @Version : 1.0
 */

public class Num278_firstBadVersion {
    public static int firstBadVersion(int n) {
        int L = 1;
        int R = n ;
        int mid = 0;
        while (L < R) {
            mid = L + (R - L ) / 2;
            if (isBadVersion(mid)) {
                R = mid;
            } else {
                L = mid + 1;
            }
        }
        return R;
    }

    private static boolean isBadVersion(int mid) {
        return false;
    }
}
